package cn.lupin.mapper;

import cn.lupin.pojo.Users;
import cn.lupin.utils.MyMapper;
import org.apache.ibatis.annotations.MapKey;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.LinkedHashMap;
import java.util.Map;

@Repository
public interface UsersMapper extends MyMapper<Users> {
    /**
     * @Description: 用户受喜欢数累加
     */
    public void addReceiveLikeCount(String userId);

    /**
     * @Description: 用户受喜欢数累减
     */
    public void reduceReceiveLikeCount(String userId);

    /**
     * @Description: 增加粉丝数
     */
    public void addFansCount(String userId);

    /**
     * @Description: 增加关注数
     */
    public void addFollowersCount(String userId);

    /**
     * @Description: 减少粉丝数
     */
    public void reduceFansCount(String userId);

    /**
     * @Description: 减少关注数
     */
    public void reduceFollowersCount(String userId);

    /**
     * @Description: 查询用户当前视频的点赞数，收藏数，评论数
     */
    public LinkedHashMap<String, Long> getUserVideoCounts(@Param("publishUserId") String publishUserId, @Param("videoId") String videoId);
}